package service

import (
	"organoid_public/domain/sample/model"
	"organoid_public/domain/sample/repository"
	"organoid_public/infrastructure/db/gormclient"
	"organoid_public/pkg/logger"
)

type SearchService struct {
	log        logger.Logger
	searchRepo repository.Search
}

func NewSampleService(log logger.Logger, searchRepo repository.Search) SearchServiceInterface {
	return &SearchService{
		log:        log,
		searchRepo: searchRepo,
	}
}

func (s *SearchService) OrganoidList(params *repository.OrganoidListParams) (*gormclient.PageList[model.SearchProtocalOrganoid], error) {
	return s.searchRepo.OrganoidPageList(params)
}

func (s *SearchService) CoCultureList(params *repository.OrganoidListParams) (*gormclient.PageList[model.SearchProtocalCoculture], error) {
	return s.searchRepo.CoCulturePageList(params)
}

func (s *SearchService) IdentifyList(params *repository.BiomarkerListParams) (*gormclient.PageList[model.SearchBiomarkerIdentified], error) {
	return s.searchRepo.IdentifyPageList(params)
}

func (s *SearchService) PotentialList(params *repository.BiomarkerListParams) (*gormclient.PageList[model.SearchBiomarkerPotential], error) {
	return s.searchRepo.PotentialPageList(params)
}
